﻿using System;

class Solution
{
    static void Main(string[] args)
    {
        Console.Write("请输入一行字符：");
        string input = Console.ReadLine();

        int letterCount = 0, spaceCount = 0, digitCount = 0, otherCount = 0;

        foreach (char c in input)
        {
            if (Char.IsLetter(c))
            {
                letterCount++;
            }
            else if (Char.IsWhiteSpace(c))
            {
                spaceCount++;
            }
            else if (Char.IsDigit(c))
            {
                digitCount++;
            }
            else
            {
                otherCount++;
            }
        }

        Console.WriteLine("英文字母个数：" + letterCount);
        Console.WriteLine("空格个数：" + spaceCount);
        Console.WriteLine("数字个数：" + digitCount);
        Console.WriteLine("其他字符个数：" + otherCount);
    }
}